package cn.spark.study.sql

import org.apache.spark.SparkConf
import org.apache.spark.SparkContext
import org.apache.spark.sql.SQLContext

object DataFrameCreate {
  def main(args: Array[String]): Unit = {
    val conf = new SparkConf()
      .setAppName("DataFrameCreate");
    val sc = new SparkContext(conf)
    val sqlC = new SQLContext(sc).read.json("hdfs://spark1:9000/students.json")
    sqlC.show()
  }
}